package com.xunwulian.base.dao;

import com.xunwulian.base.entity.SubscriberEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;


@Mapper
public interface SubscriberDao {

    /**
     * 保存用户
     */
    void insert(SubscriberEntity subscriberEntity);

    /**
     * 通过微信openId获取数据
     */
    SubscriberEntity findByOpenId(@Param("openId") String openId);

    /**
     * userId 绑定 openId
     */
    void bind(@Param("userId") String userId, @Param("openId") String openId);

    /**
     * 解绑定
     */
    void unbind(@Param("openId") String openId);

}

